package me.exchange.com.modules.system.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.exchange.com.aop.log.Log;
import me.exchange.com.modules.system.dto.FileContentQueryCriteria;
import me.exchange.com.modules.system.service.QiniuConfigService;
import me.exchange.com.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "测试mybatis")
@RestController
@RequestMapping("/api/test")
public class TestController {
    @Autowired
    private QiniuConfigService qiniuConfigService;

    @PostMapping("/list")
    @Log("查询")
    @ApiOperation("查询")
    public ResponseEntity<Object> getFileContents(){
        Object fileContent =  qiniuConfigService.selectByExample(null);
        return new ResponseEntity<>(Result.ok("查询成功").put("list",fileContent), HttpStatus.OK);
    }
}
